package com.xiaoyi.cms.service.impl;

import com.xiaoyi.cms.service.CategoryService;
import com.xiaoyi.mapper.CategoryMapper;
import com.xiaoyi.pojo.Category;
import com.xiaoyi.pojo.CategoryExample;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service(value = "categoryService")
public class CategoryServiceImpl implements CategoryService {
    @Autowired
    private CategoryMapper categoryMapper;

    @Override
    public List<Category> getList() {
        CategoryExample categoryExample = new CategoryExample();
        categoryExample.createCriteria().andCatdirIsNotNull();
        List<Category> categoryList=categoryMapper.selectByExample(categoryExample);
        return categoryList;
    }
}
